package com.promis.crypto;

import java.io.IOException;

public class BASE64Coder {

	public static byte[] decryptBASE64(String key) throws IOException{
//	    return new BASE64Decoder().decodeBuffer(key);
//		key = EncodingUtils.ajaxDecode(key);
		return Base64.decode(key, Base64.NO_WRAP);
	}

	public static String encryptBASE64(byte[] key){
//	    return new BASE64Encoder().encodeBuffer(key).replace("\r", "").replace("\n", "");

		return Base64.encodeToString(key, Base64.NO_WRAP);
//		String k = Base64.encodeToString(key, Base64.NO_WRAP);
//		return EncodingUtils.ajaxEncode(k);
	}
}
